package com.xuecheng.content.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xuecheng.api.content.model.dto.TeachplanDTO;
import com.xuecheng.api.content.model.dto.TeachplanMediaDTO;
import com.xuecheng.api.teaching.model.dto.TeachplanWorkDTO;
import com.xuecheng.content.entity.Teachplan;

/**
 * <p>
 * 课程计划 服务类
 * </p>
 *
 * @author itcast
 * @since 2021-12-11
 */
public interface TeachplanService extends IService<Teachplan> {


    /**
     * 查询课程计划树形结构
     * @param courseId Long 课程基础信息Id值
     * @param companyId Long 教学机构id
     * @return TeachplanDTO
     */
    TeachplanDTO getTreeNodes(Long courseId,Long companyId);

    /**
     * 课程计划创建和修改
     * @param dto TeachplanDTO 课程计划dto封装数据
     * @param companyId Long 教学机构id值
     * @return TeachplanDTO
     */
    TeachplanDTO createOrModifyTeachplan(TeachplanDTO dto,Long companyId);


    /**
     * 根据课程计划Id删除课程计划信息
     * @param teachPlanId {@link Long} 课程计划Id
     * @param companyId {@link Long} 公司Id
     */
    void removeTeachPlan(Long teachPlanId,Long companyId);

    /**
     * 课程计划和媒资信息绑定
     * @param dto
     * @return
     */
    TeachplanMediaDTO associationMedia(TeachplanMediaDTO dto,Long companyId);

    /**
     * 课程计划和作业信息绑定
     * @param dto
     * @param companyId
     * @return
     */
    TeachplanWorkDTO associateWork(TeachplanWorkDTO dto, Long companyId);

    /**
     * 课程计划和作业信息解绑
     * @param teachplanWorkId
     * @param companyId
     */
    void deleteTeachplanWork(String teachplanWorkId,Long courseBaseId, Long companyId);
}
